\hypertarget{classsock_1_1net_1_1detail_1_1_e_poll_reactor}{}\section{sock\+:\+:net\+:\+:detail\+:\+:E\+Poll\+Reactor Class Reference}
\label{classsock_1_1net_1_1detail_1_1_e_poll_reactor}\index{sock\+::net\+::detail\+::\+E\+Poll\+Reactor@{sock\+::net\+::detail\+::\+E\+Poll\+Reactor}}


使用epoll实现的网络反应器  




{\ttfamily \#include $<$epoll\+\_\+reactor.\+h$>$}

Inheritance diagram for sock\+:\+:net\+:\+:detail\+:\+:E\+Poll\+Reactor\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classsock_1_1net_1_1detail_1_1_e_poll_reactor}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classsock_1_1net_1_1detail_1_1_e_poll_reactor_abf92b6f6c57361657cddbb52f376e12a}{E\+Poll\+Reactor} (void)
\item 
virtual \hyperlink{classsock_1_1net_1_1detail_1_1_e_poll_reactor_aa1f901809b0973f887db0dd9f9251d89}{$\sim$\+E\+Poll\+Reactor} (void)
\item 
virtual bool \hyperlink{classsock_1_1net_1_1detail_1_1_e_poll_reactor_a7baa29fa98376bfbecc9847d88a27efe}{add\+Source} (sock\+\_\+t sock, \hyperlink{classsock_1_1net_1_1_reactor_a47804de81fecd9e153a0893926279197}{Event} event, \hyperlink{classsock_1_1net_1_1_net_event_handler}{Net\+Event\+Handler} $\ast$handler)
\begin{DoxyCompactList}\small\item\em 添加事件源 \end{DoxyCompactList}\item 
virtual void \hyperlink{classsock_1_1net_1_1detail_1_1_e_poll_reactor_a2cf3274e515fd1a8f1e109a0f9ac7697}{remove\+Source} (sock\+\_\+t sock)
\begin{DoxyCompactList}\small\item\em 移除事件源 \end{DoxyCompactList}\item 
virtual bool \hyperlink{classsock_1_1net_1_1detail_1_1_e_poll_reactor_a9812156dc8da23d27e82e35160cb6cb4}{add\+Source} (\hyperlink{classsock_1_1net_1_1_socket}{Socket} $\ast$sock, \hyperlink{classsock_1_1net_1_1_reactor_a47804de81fecd9e153a0893926279197}{Event} event, \hyperlink{classsock_1_1net_1_1_net_event_handler}{Net\+Event\+Handler} $\ast$handler)
\begin{DoxyCompactList}\small\item\em 添加事件源 \end{DoxyCompactList}\item 
virtual void \hyperlink{classsock_1_1net_1_1detail_1_1_e_poll_reactor_a8ac94101ecd364623c62148117ea2a02}{remove\+Source} (\hyperlink{classsock_1_1net_1_1_socket}{Socket} $\ast$sock)
\begin{DoxyCompactList}\small\item\em 移除事件源 \end{DoxyCompactList}\item 
virtual void \hyperlink{classsock_1_1net_1_1detail_1_1_e_poll_reactor_a09b95e05048965654a029b529f74d8a0}{tick} (int timeout=0)
\begin{DoxyCompactList}\small\item\em Tick处理网络事件 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
使用epoll实现的网络反应器 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classsock_1_1net_1_1detail_1_1_e_poll_reactor_abf92b6f6c57361657cddbb52f376e12a}{}\index{sock\+::net\+::detail\+::\+E\+Poll\+Reactor@{sock\+::net\+::detail\+::\+E\+Poll\+Reactor}!E\+Poll\+Reactor@{E\+Poll\+Reactor}}
\index{E\+Poll\+Reactor@{E\+Poll\+Reactor}!sock\+::net\+::detail\+::\+E\+Poll\+Reactor@{sock\+::net\+::detail\+::\+E\+Poll\+Reactor}}
\subsubsection[{E\+Poll\+Reactor(void)}]{\setlength{\rightskip}{0pt plus 5cm}E\+Poll\+Reactor\+::\+E\+Poll\+Reactor (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{classsock_1_1net_1_1detail_1_1_e_poll_reactor_abf92b6f6c57361657cddbb52f376e12a}
\hypertarget{classsock_1_1net_1_1detail_1_1_e_poll_reactor_aa1f901809b0973f887db0dd9f9251d89}{}\index{sock\+::net\+::detail\+::\+E\+Poll\+Reactor@{sock\+::net\+::detail\+::\+E\+Poll\+Reactor}!````~E\+Poll\+Reactor@{$\sim$\+E\+Poll\+Reactor}}
\index{````~E\+Poll\+Reactor@{$\sim$\+E\+Poll\+Reactor}!sock\+::net\+::detail\+::\+E\+Poll\+Reactor@{sock\+::net\+::detail\+::\+E\+Poll\+Reactor}}
\subsubsection[{$\sim$\+E\+Poll\+Reactor(void)}]{\setlength{\rightskip}{0pt plus 5cm}E\+Poll\+Reactor\+::$\sim$\+E\+Poll\+Reactor (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classsock_1_1net_1_1detail_1_1_e_poll_reactor_aa1f901809b0973f887db0dd9f9251d89}


\subsection{Member Function Documentation}
\hypertarget{classsock_1_1net_1_1detail_1_1_e_poll_reactor_a7baa29fa98376bfbecc9847d88a27efe}{}\index{sock\+::net\+::detail\+::\+E\+Poll\+Reactor@{sock\+::net\+::detail\+::\+E\+Poll\+Reactor}!add\+Source@{add\+Source}}
\index{add\+Source@{add\+Source}!sock\+::net\+::detail\+::\+E\+Poll\+Reactor@{sock\+::net\+::detail\+::\+E\+Poll\+Reactor}}
\subsubsection[{add\+Source(sock\+\_\+t sock, Event event, Net\+Event\+Handler $\ast$handler)}]{\setlength{\rightskip}{0pt plus 5cm}bool E\+Poll\+Reactor\+::add\+Source (
\begin{DoxyParamCaption}
\item[{sock\+\_\+t}]{sock, }
\item[{{\bf Event}}]{event, }
\item[{{\bf Net\+Event\+Handler} $\ast$}]{handler}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classsock_1_1net_1_1detail_1_1_e_poll_reactor_a7baa29fa98376bfbecc9847d88a27efe}


添加事件源 


\begin{DoxyParams}{Parameters}
{\em sock} & 套接字 \\
\hline
{\em event} & 事件 \\
\hline
{\em handler} & 事件处理器 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
bool 
\end{DoxyReturn}


Implements \hyperlink{classsock_1_1net_1_1_reactor_a31ff586f2329ba43e73ea5762b4929e7}{sock\+::net\+::\+Reactor}.

\hypertarget{classsock_1_1net_1_1detail_1_1_e_poll_reactor_a9812156dc8da23d27e82e35160cb6cb4}{}\index{sock\+::net\+::detail\+::\+E\+Poll\+Reactor@{sock\+::net\+::detail\+::\+E\+Poll\+Reactor}!add\+Source@{add\+Source}}
\index{add\+Source@{add\+Source}!sock\+::net\+::detail\+::\+E\+Poll\+Reactor@{sock\+::net\+::detail\+::\+E\+Poll\+Reactor}}
\subsubsection[{add\+Source(\+Socket $\ast$sock, Event event, Net\+Event\+Handler $\ast$handler)}]{\setlength{\rightskip}{0pt plus 5cm}bool E\+Poll\+Reactor\+::add\+Source (
\begin{DoxyParamCaption}
\item[{{\bf Socket} $\ast$}]{sock, }
\item[{{\bf Event}}]{event, }
\item[{{\bf Net\+Event\+Handler} $\ast$}]{handler}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classsock_1_1net_1_1detail_1_1_e_poll_reactor_a9812156dc8da23d27e82e35160cb6cb4}


添加事件源 


\begin{DoxyParams}{Parameters}
{\em sock} & 套接字 \\
\hline
{\em event} & 事件 \\
\hline
{\em handler} & 事件处理器 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
bool 
\end{DoxyReturn}


Implements \hyperlink{classsock_1_1net_1_1_reactor_a9bbc07e2fca79e7c09a0be3d80d313bd}{sock\+::net\+::\+Reactor}.

\hypertarget{classsock_1_1net_1_1detail_1_1_e_poll_reactor_a2cf3274e515fd1a8f1e109a0f9ac7697}{}\index{sock\+::net\+::detail\+::\+E\+Poll\+Reactor@{sock\+::net\+::detail\+::\+E\+Poll\+Reactor}!remove\+Source@{remove\+Source}}
\index{remove\+Source@{remove\+Source}!sock\+::net\+::detail\+::\+E\+Poll\+Reactor@{sock\+::net\+::detail\+::\+E\+Poll\+Reactor}}
\subsubsection[{remove\+Source(sock\+\_\+t sock)}]{\setlength{\rightskip}{0pt plus 5cm}void E\+Poll\+Reactor\+::remove\+Source (
\begin{DoxyParamCaption}
\item[{sock\+\_\+t}]{sock}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classsock_1_1net_1_1detail_1_1_e_poll_reactor_a2cf3274e515fd1a8f1e109a0f9ac7697}


移除事件源 


\begin{DoxyParams}{Parameters}
{\em sock} & 套接字 \\
\hline
\end{DoxyParams}


Implements \hyperlink{classsock_1_1net_1_1_reactor_acd768d76883d1217bb4cf10a3820990e}{sock\+::net\+::\+Reactor}.

\hypertarget{classsock_1_1net_1_1detail_1_1_e_poll_reactor_a8ac94101ecd364623c62148117ea2a02}{}\index{sock\+::net\+::detail\+::\+E\+Poll\+Reactor@{sock\+::net\+::detail\+::\+E\+Poll\+Reactor}!remove\+Source@{remove\+Source}}
\index{remove\+Source@{remove\+Source}!sock\+::net\+::detail\+::\+E\+Poll\+Reactor@{sock\+::net\+::detail\+::\+E\+Poll\+Reactor}}
\subsubsection[{remove\+Source(\+Socket $\ast$sock)}]{\setlength{\rightskip}{0pt plus 5cm}void E\+Poll\+Reactor\+::remove\+Source (
\begin{DoxyParamCaption}
\item[{{\bf Socket} $\ast$}]{sock}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classsock_1_1net_1_1detail_1_1_e_poll_reactor_a8ac94101ecd364623c62148117ea2a02}


移除事件源 


\begin{DoxyParams}{Parameters}
{\em sock} & 套接字 \\
\hline
\end{DoxyParams}


Implements \hyperlink{classsock_1_1net_1_1_reactor_add2344de23e45df195bd173d05ba2075}{sock\+::net\+::\+Reactor}.

\hypertarget{classsock_1_1net_1_1detail_1_1_e_poll_reactor_a09b95e05048965654a029b529f74d8a0}{}\index{sock\+::net\+::detail\+::\+E\+Poll\+Reactor@{sock\+::net\+::detail\+::\+E\+Poll\+Reactor}!tick@{tick}}
\index{tick@{tick}!sock\+::net\+::detail\+::\+E\+Poll\+Reactor@{sock\+::net\+::detail\+::\+E\+Poll\+Reactor}}
\subsubsection[{tick(int timeout=0)}]{\setlength{\rightskip}{0pt plus 5cm}void E\+Poll\+Reactor\+::tick (
\begin{DoxyParamCaption}
\item[{int}]{timeout = {\ttfamily 0}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classsock_1_1net_1_1detail_1_1_e_poll_reactor_a09b95e05048965654a029b529f74d8a0}


Tick处理网络事件 


\begin{DoxyParams}{Parameters}
{\em timeout} & 等待超时时间 \\
\hline
\end{DoxyParams}


Implements \hyperlink{classsock_1_1net_1_1_reactor_a479c30f659596b68d0ad820981227ebf}{sock\+::net\+::\+Reactor}.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
E\+:/git/sock/sock/net/detail/\hyperlink{epoll__reactor_8h}{epoll\+\_\+reactor.\+h}\item 
E\+:/git/sock/src/net/detail/\hyperlink{epoll__reactor_8cc}{epoll\+\_\+reactor.\+cc}\end{DoxyCompactItemize}
